package com.settlement.system.model.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.*;

/**
 * 原始抖音订单导入对象
 *
 * @author haoxr
 * @since 2022/4/10
 */
@Data
public class DyOrderImportVo {
    @ExcelProperty(value = "主订单编号")
    private String mainOrderNo;

    @ExcelProperty(value = "子订单编号")
    private String subOrderNo;

    @ExcelProperty(value = "选购商品")
    private String buyProduct;

    @ExcelProperty(value = "商品规格")
    private String specifications;

    @ExcelProperty(value = "商品数量")
    private Integer quantity;

    @ExcelProperty(value = "商品ID")
    private String productId;

    @ExcelProperty(value = "商家编码")
    private String businessCode;

    @ExcelProperty(value = "商品单价")
    private BigDecimal productPrice;

    @ExcelProperty(value = "订单应付金额")
    private BigDecimal payAmount;

    @ExcelProperty(value = "运费")
    private BigDecimal transportFee;

    @ExcelProperty(value = "优惠总金额")
    private BigDecimal preferentialAmout;

    @ExcelProperty(value = "平台优惠")
    private String preformPreferential;

    @ExcelProperty(value = "商家优惠")
    private String businessPreferential;

    @ExcelProperty(value = "达人优惠")
    private String drPreferential;

    @ExcelProperty(value = "商家改价")
    private BigDecimal modifyPrice;

    @ExcelProperty(value = "支付优惠")
    private BigDecimal payPreferential;

    @ExcelProperty(value = "红包抵扣")
    private BigDecimal deduction;

    @ExcelProperty(value = "支付方式")
    private String payType;

    @ExcelProperty(value = "手续费")
    private BigDecimal handlingFee;

    @ExcelProperty(value = "收件人")
    private String receiver;

    @ExcelProperty(value = "收件人手机号")
    private String receiverPhone;

    @ExcelProperty(value = "省")
    private String provice;

    @ExcelProperty(value = "市")
    private String city;

    @ExcelProperty(value = "区")
    private String area;

    @ExcelProperty(value = "街道")
    private String street;

    @ExcelProperty(value = "详细地址")
    private String address;

    @ExcelProperty(value = "是否修改过地址")
    private String modifyAddress;

    @ExcelProperty(value = "买家留言")
    private String buyerRemark;

    @ExcelProperty(value = "订单提交时间")
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    private LocalDateTime orderTime;

    @ExcelProperty(value = "旗帜颜色")
    private String flagColor;

    @ExcelProperty(value = "商家备注")
    private String sellerRemark;

    @ExcelProperty(value = "订单完成时间")
    private String orderFinishTime;

    @ExcelProperty(value = "支付完成时间")
    private String payFinishTime;

    @ExcelProperty(value = "APP渠道")
    private String appChannel;

    @ExcelProperty(value = "流量来源")
    private String source;

    @ExcelProperty(value = "订单状态")
    private String orderStatus;

    @ExcelProperty(value = "承诺发货时间")
    private String promiseSendTime;

    @ExcelProperty(value = "订单类型")
    private String orderType;

    @ExcelProperty(value = "鲁班落地页ID")
    private String lbldyId;

    @ExcelProperty(value = "达人ID")
    private String drId;

    @ExcelProperty(value = "达人昵称")
    private String drNickName;

    @ExcelProperty(value = "所属门店ID")
    private String ownerShopId;

    @ExcelProperty(value = "售后状态")
    private String serviceStatus;

    @ExcelProperty(value = "取消原因")
    private String rejectReason;

    @ExcelProperty(value = "预约发货时间")
    private String previousSendTime;

    @ExcelProperty(value = "仓库ID")
    private String storeId;

    @ExcelProperty(value = "仓库名称")
    private String storeName;

    @ExcelProperty(value = "是否安心购")
    private String peaceBuy;

    @ExcelProperty(value = "广告渠道")
    private String adviceChannel;

    @ExcelProperty(value = "流量类型")
    private String flowType;

    @ExcelProperty(value = "流量体裁")
    private String flowApp;

    @ExcelProperty(value = "流量渠道")
    private String flowChannel;

    @ExcelProperty(value = "发货主体")
    private String senderCompany;

    @ExcelProperty(value = "发货主体明细")
    private String senderCompanyDetail;

    @ExcelProperty(value = "发货时间")
    private String sendTime;

    @ExcelProperty(value = "降价类优惠")
    private BigDecimal cutPrice;

    @ExcelProperty(value = "平台实际承担优惠金额")
    private BigDecimal preformPreferentialPrice;

    @ExcelProperty(value = "商家实际承担优惠金额")
    private BigDecimal sellerPreferentialPrice;

    @ExcelProperty(value = "达人实际承担优惠金额")
    private BigDecimal drPreferentialPrice;

    @ExcelProperty(value = "预计送达时间")
    private String previousReceiveTime;

    @ExcelProperty(value = "是否平台仓自流转")
    private String preformFlow;

    @ExcelProperty(value = "车型")
    private String vehicle;

    public static List<String> getColumns() {
        List<String> columns = new ArrayList<>();
        columns.add("主订单编号");
        columns.add("子订单编号");
        columns.add("选购商品");
        columns.add("商品规格");
        columns.add("商品数量");
        columns.add("商品ID");
        columns.add("商家编码");
        columns.add("商品单价");
        columns.add("订单应付金额");
        columns.add("运费");
        columns.add("优惠总金额");
        columns.add("平台优惠");
        columns.add("商家优惠");
        columns.add("达人优惠");
        columns.add("商家改价");
        columns.add("支付优惠");
        columns.add("红包抵扣");
        columns.add("支付方式");
        columns.add("手续费");
        columns.add("收件人");
        columns.add("收件人手机号");
        columns.add("街道");
        columns.add("详细地址");
        columns.add("是否修改过地址");
        columns.add("买家留言");
        columns.add("订单提交时间");
        columns.add("旗帜颜色");
        columns.add("商家备注");
        columns.add("订单完成时间");
        columns.add("支付完成时间");
        columns.add("APP渠道");
        columns.add("流量来源");
        columns.add("订单状态");
        columns.add("承诺发货时间");
        columns.add("订单类型");
        columns.add("鲁班落地页ID");
        columns.add("达人ID");
        columns.add("达人昵称");
        columns.add("所属门店ID");
        columns.add("售后状态");
        columns.add("取消原因");
        columns.add("预约发货时间");
        columns.add("仓库ID");
        columns.add("仓库名称");
        columns.add("是否安心购");
        columns.add("广告渠道");
        columns.add("流量类型");
        columns.add("流量体裁");
        columns.add("流量渠道");
        columns.add("发货主体");
        columns.add("发货主体明细");
        columns.add("发货时间");
        columns.add("降价类优惠");
        columns.add("平台实际承担优惠金额");
        columns.add("商家实际承担优惠金额");
        columns.add("达人实际承担优惠金额");
        columns.add("预计送达时间");
        columns.add("是否平台仓自流转");
        columns.add("车型");
        return columns;
    }

    public static Map<String, String> getKeyMap(){
        Map<String, String> map = new HashMap<>();
        map.put("主订单编号", "mainOrderNo");
        map.put("子订单编号", "subOrderNo");
        map.put("选购商品", "buyProduct");
        map.put("商品规格", "specifications");
        map.put("商品数量", "quantity");
        map.put("商品ID", "productId");
        map.put("商家编码", "businessCode");
        map.put("商品单价", "productPrice");
        map.put("订单应付金额", "payAmount");
        map.put("运费", "transportFee");
        map.put("优惠总金额", "preferentialAmout");
        map.put("平台优惠", "preformPreferential");
        map.put("商家优惠", "businessPreferential");
        map.put("达人优惠", "drPreferential");
        map.put("商家改价", "modifyPrice");
        map.put("支付优惠", "payPreferential");
        map.put("红包抵扣", "deduction");
        map.put("支付方式", "payType");
        map.put("手续费", "handlingFee");
        map.put("收件人", "receiver");
        map.put("收件人手机号", "receiverPhone");
        map.put("省", "provice");
        map.put("市", "city");
        map.put("区", "area");
        map.put("街道", "street");
        map.put("详细地址", "address");
        map.put("是否修改过地址", "modifyAddress");
        map.put("买家留言", "buyerRemark");
        map.put("订单提交时间", "orderTime");
        map.put("旗帜颜色", "flagColor");
        map.put("商家备注", "sellerRemark");
        map.put("订单完成时间", "orderFinishTime");
        map.put("支付完成时间", "payFinishTime");
        map.put("APP渠道", "appChannel");
        map.put("流量来源", "source");
        map.put("订单状态", "orderStatus");
        map.put("承诺发货时间", "promiseSendTime");
        map.put("订单类型", "orderType");
        map.put("鲁班落地页ID", "lbldyId");
        map.put("达人ID", "drId");
        map.put("达人昵称", "drNickName");
        map.put("所属门店ID", "ownerShopId");
        map.put("售后状态", "serviceStatus");
        map.put("取消原因", "rejectReason");
        map.put("预约发货时间", "previousSendTime");
        map.put("仓库ID", "storeId");
        map.put("仓库名称", "storeName");
        map.put("是否安心购", "peaceBuy");
        map.put("广告渠道", "adviceChannel");
        map.put("流量类型", "flowType");
        map.put("流量体裁", "flowApp");
        map.put("流量渠道", "flowChannel");
        map.put("发货主体", "senderCompany");
        map.put("发货主体明细", "senderCompanyDetail");
        map.put("发货时间", "sendTime");
        map.put("降价类优惠", "cutPrice");
        map.put("平台实际承担优惠金额", "preformPreferentialPrice");
        map.put("商家实际承担优惠金额", "sellerPreferentialPrice");
        map.put("达人实际承担优惠金额", "drPreferentialPrice");
        map.put("预计送达时间", "previousReceiveTime");
        map.put("是否平台仓自流转", "preformFlow");
        map.put("车型", "vehicle");
        map.put("账单月份", "billMonth");
        return map;
    }
}
